import string, sys, traceback

def printStack(exc_info):
    # generic error
    # first argument: type error
    # second argument: error message
    # third argument: stack
    etype = str(exc_info[0])
    evalue = str(exc_info[1])
    etb = str(traceback.extract_tb(exc_info[2]))
    return etype + " - " + evalue + " - " + etb